<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.Map"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.util.Iterator"%>
 
<%@ page import="org.limp.mine.Label"%>
<%@ page import="org.limp.mine.Controller"%>	
<%@ page import="org.limp.mine.DateTrimmer"%>
<% 
    String context = jt.classic.system.ISystem.getContextPath();
	Object[] result = (Object[])request.getAttribute("result");	
	
	Label label = (Label)result[1];
	Controller controller = (Controller)result[2];	
	String pageNO = (String)result[3];
	List resultList = (List) result[0];
	
	String name = (String)request.getAttribute("NAME");
	if(name==null || "".equals(name)){
		name="";
	}
	String the_month = (String)request.getAttribute("month");
	if(the_month==null || "".equals(the_month)){
		the_month="0";
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>办公用品月统计列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<jsp:include page="../head.jsp"></jsp:include>
<style>
h1 {
	font-family: Arial, sans-serif;
	font-size: 15px;
	color: #369;
	padding-bottom: 4px;
	border-bottom: 1px solid #999;
}
</style>
<script language="javascript">
  function handleQuery(){
    document.form1.action = context + "/app/bgyp.do?method=listty_query";
    document.form1.submit();
  }
  
    
   
  function handleReresh(){
      window.location.href = context + "/app/bgyp.do?method=listty_query&pageNO=<%=pageNO%>";
  }
</script>
<script src="<%=context%>/resources/common/js/common.js"></script>
<body onload="inithelper();">
<form name="form1" method="post" action="">
<input type="hidden" name="pageNO" value="<%=pageNO%>">
<br/>
<div style="width:100%;"><h1>&nbsp;&nbsp;办公用品废弃统计列表</h1></div>
<table class="tab4list" border="0" width="95%" cellspacing="0" cellpadding="0" align="center">
  <tr>
   <td colspan="5" align="left" class="td0">
            办公用品名称： <input type="text" class="box3" name="NAME" value="<%=name%>">
            月份： <select name="month" SIZE="1">
                    <option value=""><option>
                    <% for(int i=1;i<13;i++){%>
                       <option value="<%=i%>"<% if(i==Integer.parseInt(the_month)){%> selected<%}%>><%=i%>月</option>
                   <%} %>
                </select>
      <img src="/oa/system/workflow/images/query.png" title="查询" style="cursor:hand;margin-bottom:-4px;" onclick="javascript:handleQuery();"/>查询      
   </td>
  </tr>
  <tr class="tr0" bgcolor="#A7CADE">
    <td class="td1" width="5%">&nbsp;</td>
  	<td class="td1" width="30%">&nbsp;办公用品名称</td>
    <td class="td1" width="20%">&nbsp;总废弃数量</td>
    <td class="td1" width="20%">&nbsp;单价</td>
    <td class="td1" width="20%">&nbsp;总废弃价格</td>
    
  </tr>
  <% 
    if(resultList!=null&&!resultList.isEmpty()){
    
       for(int i=0;i<resultList.size();i++){
	       Map info = (Map)resultList.get(i);
	       String number = (String)info.get("PAGINATION_NUMBER");
	       String bgyp_name = info.get("NAME").toString();
	       String kc_num = info.get("KC_NUM").toString();
           String price = info.get("PRICE").toString();
           
           
           //String mytime = DateTrimmer.format2YYYYMMdd(SEND_TIME);
          
           
          
  %> 
  <tr> 
    <td height="27" align="center">&nbsp;<%=number%></td>
    <td>&nbsp;<%=bgyp_name%></td>
    <td>&nbsp;<%=kc_num%></td>
    <td>&nbsp;<%=price%></td>
    <td>&nbsp;<%=Integer.parseInt(kc_num)*Float.parseFloat(price)%></td>
    
  </tr>
  <%
        }
     }
  %>
</table> 
<table width="95%" class="tab-noborder" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
   <td>
    <%=label.displayLabel()%>
   </td>
   <td align="right">
        <%=label.startLabel()%>
        <%=label.previousLabel()%>
        <%=label.nextLabel()%>
        <%=label.endLabel()%>
        <%=controller.getController().toString()%>
    </td>
  </tr>
</table>  
<%=controller.getControlScript(true)%> 
</form>
</body>
</html>	